import request from "@/utils/request"
import { SSL_OP_NETSCAPE_REUSE_CIPHER_CHANGE_BUG } from "constants";
const group_name='gathering'
const api_name='gathering'
export default {
    getList(){
        return request({
            url:`/${group_name}`,
            method:'get'
        })
    },
    search(searchMap,page,size){
        return request({
            url:`/${group_name}/search/${page}/${size}`,
            method:'post'
        })
    },
    save(pojo){
        return request({
            url: `/${group_name}`,
            method: 'post',
            data: pojo
        })
    },
    findById(id) {
        return request({
            url: `/${group_name}/${id}`,
            method: 'get'
        })
    },
    update(id,pojo) {
        return request({
            url: `/${group_name}/${id}`,
            method: 'put',
            data: pojo
        })
    },
    saveOrUpdate(id, pojo){
        if(id != undefined && id != null && id != ''){
            return this.update(id,pojo);
        }else{
            return this.save(pojo);
        }
    },
    delete(id) {
        return request({
            url: `/${group_name}/${id}`,
            method: 'delete'
        })
    },                
    
}